<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="eventfilter.aspx.cs" Inherits="GleamTech.FileVista.EventFilterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%=InsertInfo%>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title><%=language.GetString("645")%></title>
    	<link href="filevistacontrol/styles/default.css" rel="stylesheet" />
		<script type="text/javascript">
	        function OnLoad() {
	            var EventFilter = parent.EventFilter;
	            
                for (var i = 0; i < 13; i++)
                    document.getElementById("CheckBox" + i).checked = (EventFilter.types.charAt(i) == "1");
	        
                document.getElementById("TextBoxUser").value = EventFilter.user;
                document.getElementById("TextBoxFromDate").value = EventFilter.fromDate;
                document.getElementById("TextBoxToDate").value = EventFilter.toDate;
                EventFilter.dialogVisible = true;
            }
            
	        function OnSubmit() {
	            var EventFilter = parent.EventFilter;
	        
                EventFilter.types = "";
                for (var i = 0; i < 13; i++)
                    EventFilter.types += (document.getElementById("CheckBox" + i).checked ? "1" : "0");
            
                EventFilter.user = document.getElementById("TextBoxUser").value;
                EventFilter.fromDate = document.getElementById("TextBoxFromDate").value;
                EventFilter.toDate = document.getElementById("TextBoxToDate").value;
                
                if (parent.currentSection == parent.SECTIONEVENTS)
                    parent.setTimeout("executeCommand('RefreshEvents')", 0);
                else
                    parent.setTimeout("executeCommand('RefreshEventsOfGroup')", 0);
            }
        </script>
    </head>
    <body class="dialog" onload="OnLoad()">
        <form id="form1" runat="server">
			<table cellpadding="0" cellspacing="10" border="0" style="width: 100%; height: 100%;">
			    <tr>
			        <td colspan="2">
                        <fieldset><legend style="color:black; text-align:center"><%=language.GetString("637")%></legend>
                            <table style="width: 250px; margin-top: 10px; margin-bottom: 10px; margin-left: 10px" cellpadding="0" cellspacing="0" border="0">
                                <tr>
                                    <td><asp:CheckBox ID="CheckBox0" runat="server" /></td>
                                    <td><asp:CheckBox ID="CheckBox1" runat="server" /></td>
                                </tr>
                                <tr>
                                    <td><asp:CheckBox ID="CheckBox2" runat="server" /></td>
                                    <td><asp:CheckBox ID="CheckBox3" runat="server" /></td>
                                </tr>
                                <tr>
                                    <td><asp:CheckBox ID="CheckBox4" runat="server" /></td>
                                    <td><asp:CheckBox ID="CheckBox5" runat="server" /></td>
                                </tr>
                                <tr>
                                    <td><asp:CheckBox ID="CheckBox6" runat="server" /></td>
                                    <td><asp:CheckBox ID="CheckBox7" runat="server" /></td>
                                </tr>
                                <tr>
                                    <td><asp:CheckBox ID="CheckBox8" runat="server" /></td>
                                    <td><asp:CheckBox ID="CheckBox9" runat="server" /></td>
                                </tr>
                                <tr>
                                    <td><asp:CheckBox ID="CheckBox10" runat="server" /></td>
                                    <td><asp:CheckBox ID="CheckBox11" runat="server" /></td>
                                </tr>
                                <tr>
                                    <td><asp:CheckBox ID="CheckBox12" runat="server" /></td>
                                    <td>&nbsp;</td>
                                </tr>
                            </table>
                        </fieldset>			        
			        </td>
			    </tr>
                <tr>
                    <td style="width: 100px"><%=language.GetString("619")%>:</td>
                    <td><asp:TextBox ID="TextBoxUser" runat="server" style="width: 180px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td><%=language.GetString("647")%>:</td>
                    <td><asp:TextBox ID="TextBoxFromDate" runat="server" style="width: 80px; text-align: right"></asp:TextBox>&nbsp;-&nbsp;<asp:TextBox ID="TextBoxToDate" runat="server" style="width: 80px; text-align: right"></asp:TextBox></td>
                </tr>
            </table>
			<div style="position:absolute; right:5px; bottom:10px"><asp:Button ID="Button1" runat="server" style="width: 80px" OnClientClick="OnSubmit(); return false;" />&nbsp;<asp:Button ID="Button2" runat="server" Text="Button" style="width: 80px" OnClientClick="parent.ModalDialog.close(); return false;" /></div>
        </form>
    </body>
</html>
